package com.baor.permissions.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baor.common.annotation.Excel;
import com.baor.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 管理员对象 t_admin
 * 
 * @author ruoyi
 * @date 2025-07-17
 */
@Data
public class TAdmin extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 管理员id */
    @Excel(name = "管理员id")
    private Long adminId;

    /** 管理员账号 */
    @Excel(name = "管理员账号")
    private String adminAccount;

    /** 管理员姓名 */
    @Excel(name = "管理员姓名")
    private String adminName;

    /** 角色ID */
    @Excel(name = "角色ID")
    private Long roleId;

    /** 用户状态（0正常 1锁定） */
    @Excel(name = "用户状态", readConverterExp = "0=正常,1=锁定")
    private Long status;

    /** 最后登录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 最后登录IP */
    @Excel(name = "最后登录IP")
    private String endLoginIP;

    /** 管理员头像 */
    @Excel(name = "管理员头像")
    private String adminIcon;

    /** 删除标识（0未删除 1已删除） */
    @Excel(name = "删除标识", readConverterExp = "0=未删除,1=已删除")
    private Long delFlag;
    
    @TableField(exist = false)
    private String roleName;
    
    

    public void setAdminId(Long adminId) 
    {
        this.adminId = adminId;
    }

    public Long getAdminId() 
    {
        return adminId;
    }

    public void setAdminAccount(String adminAccount) 
    {
        this.adminAccount = adminAccount;
    }

    public String getAdminAccount() 
    {
        return adminAccount;
    }

    public void setAdminName(String adminName) 
    {
        this.adminName = adminName;
    }

    public String getAdminName() 
    {
        return adminName;
    }

    public void setRoleId(Long roleId) 
    {
        this.roleId = roleId;
    }

    public Long getRoleId() 
    {
        return roleId;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setEndLoginIP(String endLoginIP) 
    {
        this.endLoginIP = endLoginIP;
    }

    public String getEndLoginIP() 
    {
        return endLoginIP;
    }

    public void setAdminIcon(String adminIcon) 
    {
        this.adminIcon = adminIcon;
    }

    public String getAdminIcon() 
    {
        return adminIcon;
    }

    public void setDelFlag(Long delFlag) 
    {
        this.delFlag = delFlag;
    }

    public Long getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("adminId", getAdminId())
            .append("adminAccount", getAdminAccount())
            .append("adminName", getAdminName())
            .append("roleId", getRoleId())
            .append("status", getStatus())
            .append("endTime", getEndTime())
            .append("endLoginIP", getEndLoginIP())
            .append("adminIcon", getAdminIcon())
            .append("createTime", getCreateTime())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
